package com.jyxd.web.controller.patient;

import com.jyxd.web.data.dto.HttpResult;
import com.jyxd.web.service.patient.PatientCriticalDescriptionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Api(tags = "患者危急值查询")
@Controller
@RequestMapping(value = "/patientCriticalDescription")
public class PatientCriticalDescriptionController {

    @Autowired
    private PatientCriticalDescriptionService patientCriticalDescriptionService;

    @ApiOperation("根据患者id查询患者最新危急值")
    @RequestMapping(value = "/getNewCriticalDescription", method = RequestMethod.POST)
    @ResponseBody
    public HttpResult getNewCriticalDescription(@RequestBody Map<String, Object> map) {
        return patientCriticalDescriptionService.getNewCriticalDescription(map);
    }
}
